$(function(){
	$(".follow-btn").click(follow);
});

function follow() {
	var btn = this;
	$.post(
		CONTEXT_PATH + "/follow",
		{"entityType":3,"entityId":$(btn).prev().val()},
		function (data) {
			data = $.parseJSON(data);
			if(data.code === 0){
				location.reload();
			} else {
				alert(data.msg);
			}
		}
	);
}